package yhao.infra.feature.aliyun.oss;

import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import yhao.infra.feature.aliyun.oss.core.AliyunOssComponent;
import yhao.infra.feature.aliyun.oss.type.AliyunOssImgTypeHelper;

/**
 * Created by yoara on 2017/12/7.
 */
@EnableConfigurationProperties(AliyunOssProperties.class)
public class AliyunOssConfig {
    public final static int SIZE_UNDEF = -1;

    @Bean("aliyunOssComponent")
    public AliyunOssComponent aliyunOssComponent(){
        //默认提供了几种后缀方式，需要请自行定义调用
        AliyunOssImgTypeHelper.initHelper(null);
        return new AliyunOssComponent();
    }
}
